<script>
    $("#admin").validate({
            
        submitHandler: function(form) {
            $(form).ajaxSubmit({
                target: "#content",
                beforeSubmit:function(){
                    $(".submit_button").hide();
                            
                }
                    
            }
       
        );
                
                
        }
           
    });
    $(".calendario").datepicker({
        yearRange: '1900:2050',
        dateFormat: 'yy-mm-dd',
        showOn: 'both',
        buttonImage: './img/calendar.jpg',
        buttonImageOnly: true,
        changeYear: true,
        numberOfMonths: 1

    });
</script>
<?php echo $this->Form->create("Company", array("id" => "admin", "action" => "financiera/" . $this->data['Company']['id'])); ?>
<?php echo $this->Form->hidden('Company.id'); ?>

<table border="1">

    <tbody>
        <tr>
            <td><?php echo $this->Form->input('Company.fecha_ultima_asamblea', array('label' => 'Fecha de última asamblea o reunión', 'class' => 'calendario', 'type' => 'text')); ?></td>
            <td><?php echo $this->Form->input('Company.estatutos_vigentes', array('label' => 'Tiene estatutos vigentes', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.fecha_actualizacion', array('label' => 'Fecha de actualización', 'class' => 'calendario', 'type' => 'text')); ?></td>
        </tr>
        <tr>
            <td><?php echo $this->Form->input('Company.gestion_contable', array('label' => 'Registra gestión contable', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.libro_contable', array('label' => 'Lleva libros contables', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.libro_cual', array('label' => '¿Cuales libros?', 'class' => '')); ?></td>
        </tr>
        <tr>
            <td><?php echo $this->Form->input('Company.dt_libros', array('label' => 'Registra en la D.T los libros', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.monto_patrimonio', array('label' => 'Monto patrimonio actual', 'class' => '')); ?></td>
            <td><?php echo $this->Form->input('Company.activos', array('label' => 'Activos', 'class' => '')); ?></td>
        </tr>
        <tr>
            <td><?php echo $this->Form->input('Company.pasivos', array('label' => 'Pasivos', 'class' => '')); ?></td>
            <td><?php echo $this->Form->input('Company.estados_finacieros', array('label' => 'Realiza estados finacieros periodicamente', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.presenta_estados', array('label' => 'los presenta a la dirección territorial para su aprobación', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
        </tr>
        <tr>
            <td><?php echo $this->Form->input('Company.gestion_administrativa', array('label' => 'Realiza gestión administrativa', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.empleados_activos', array('label' => 'Tiene empleados administrativos', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.adeuda_impuestos', array('label' => 'Adeuda impuestos', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
        </tr>
        <tr>
            <td><?php echo $this->Form->input('Company.tiene_creditos', array('label' => 'Tiene créditos', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.credito_banco', array('label' => 'Credito con bancos', 'type' => 'checkbox')); ?></td>
            <td><?php echo $this->Form->input('Company.credito_particular', array('label' => 'Credito con particulares', 'type' => 'checkbox')); ?></td>
        </tr>
        <tr>
            <td><?php echo $this->Form->input('Company.adeuda_servicios', array('label' => 'Adeuda servicios públicos', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.tiene_gavamenes', array('label' => 'Tiene gravamenes', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td><?php echo $this->Form->input('Company.hipoteca', array('label' => 'Hipoteca', 'class' => '','type' => 'checkbox')); ?></td>
        </tr>
        <tr>
            <td><?php echo $this->Form->input('Company.embargo', array('label' => 'Embargo', 'class' => '','type' => 'checkbox')); ?></td>
            <td><?php echo $this->Form->input('Company.otras_deudas', array('label' => 'Otras deudas', 'class' => '', 'empty' => '', 'options' => array('Si' => 'Si', 'No' => 'No'))); ?></td>
            <td></td>
        </tr>
        
    </tbody>
</table>





<fieldset><legend>Mecanismos de autocontrol que utiliza la empresa</legend>
    <table>
        <tbody> 
            <tr>
                <td><?php echo $this->Form->input('Company.revision_fiscal', array('label' => 'Revisión fiscal', 'class' => '','type' => 'checkbox')); ?></td>
                <td><?php echo $this->Form->input('Company.junta_vigilancia', array('label' => 'Junta de vigilancia', 'class' => '','type' => 'checkbox')); ?></td>
                <td><?php echo $this->Form->input('Company.otro_autocontrol', array('label' => 'otra ¿Cuál?', 'class' => '')); ?></td>
            </tr>
        </tbody>
    </table>
    
</fieldset>
<?php echo $this->Form->input('Company.observacion_financieras', array('label' => 'Observaciones', 'class' => '')); ?>
<?php echo $this->Form->end(array('label' => 'Guardar', 'class' => 'submit_button')); ?>
